3.170 \(\int \sec ^2(e+f x) (a+a \sec (e+f x)) (c-c \sec (e+f x)) \, dx\)

Optimal. Leaf size=17 \[ -\frac {a c \tan ^3(e+f x)}{3 f} \]

[Out]

-1/3*a*c*tan(f*x+e)^3/f

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {3962, 2607, 30} \[ -\frac {a c \tan ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^2*(a + a*Sec[e + f*x])*(c - c*Sec[e + f*x]),x]

[Out]

-(a*c*Tan[e + f*x]^3)/(3*f)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 3962

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)
]*(d_.) + (c_))^(n_.), x_Symbol] :> Dist[(-(a*c))^m, Int[ExpandTrig[(g*csc[e + f*x])^p*cot[e + f*x]^(2*m), (c
+ d*csc[e + f*x])^(n - m), x], x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2
 - b^2, 0] && IntegersQ[m, n] && GeQ[n - m, 0] && GtQ[m*n, 0]

Rubi steps

\begin {align*} \int \sec ^2(e+f x) (a+a \sec (e+f x)) (c-c \sec (e+f x)) \, dx &=-\left ((a c) \int \sec ^2(e+f x) \tan ^2(e+f x) \, dx\right )\\ &=-\frac {(a c) \operatorname {Subst}\left (\int x^2 \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {a c \tan ^3(e+f x)}{3 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 17, normalized size = 1.00 \[ -\frac {a c \tan ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^2*(a + a*Sec[e + f*x])*(c - c*Sec[e + f*x]),x]

[Out]

-1/3*(a*c*Tan[e + f*x]^3)/f

________________________________________________________________________________________

fricas [B]  time = 0.43, size = 35, normalized size = 2.06 \[ \frac {{\left (a c \cos \left (f x + e\right )^{2} - a c\right )} \sin \left (f x + e\right )}{3 \, f \cos \left (f x + e\right )^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x, algorithm="fricas")

[Out]

1/3*(a*c*cos(f*x + e)^2 - a*c)*sin(f*x + e)/(f*cos(f*x + e)^3)

________________________________________________________________________________________

giac [A]  time = 1.39, size = 16, normalized size = 0.94 \[ -\frac {a c \tan \left (f x + e\right )^{3}}{3 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x, algorithm="giac")

[Out]

-1/3*a*c*tan(f*x + e)^3/f

________________________________________________________________________________________

maple [B]  time = 0.94, size = 36, normalized size = 2.12 \[ \frac {c a \tan \left (f x +e \right )+c a \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (f x +e \right )\right )}{3}\right ) \tan \left (f x +e \right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^2*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x)

[Out]

1/f*(c*a*tan(f*x+e)+c*a*(-2/3-1/3*sec(f*x+e)^2)*tan(f*x+e))

________________________________________________________________________________________

maxima [B]  time = 0.56, size = 36, normalized size = 2.12 \[ -\frac {{\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a c - 3 \, a c \tan \left (f x + e\right )}{3 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x, algorithm="maxima")

[Out]

-1/3*((tan(f*x + e)^3 + 3*tan(f*x + e))*a*c - 3*a*c*tan(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 1.70, size = 15, normalized size = 0.88 \[ -\frac {a\,c\,{\mathrm {tan}\left (e+f\,x\right )}^3}{3\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + a/cos(e + f*x))*(c - c/cos(e + f*x)))/cos(e + f*x)^2,x)

[Out]

-(a*c*tan(e + f*x)^3)/(3*f)

________________________________________________________________________________________

sympy [A]  time = 2.30, size = 51, normalized size = 3.00 \[ \begin {cases} \frac {- a c \left (\frac {\tan ^{3}{\left (e + f x \right )}}{3} + \tan {\left (e + f x \right )}\right ) + a c \tan {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (a \sec {\relax (e )} + a\right ) \left (- c \sec {\relax (e )} + c\right ) \sec ^{2}{\relax (e )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**2*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x)

[Out]

Piecewise(((-a*c*(tan(e + f*x)**3/3 + tan(e + f*x)) + a*c*tan(e + f*x))/f, Ne(f, 0)), (x*(a*sec(e) + a)*(-c*se
c(e) + c)*sec(e)**2, True))

________________________________________________________________________________________